package org.dtrd.modules.food.entity.bean;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.dtrd.modules.food.entity.po.DtrdExtEmsYwFoodCategory;

import java.util.Date;

/**
 * <p>
 * 食材分类
 * </p>
 *
 * @author QR
 * @since 2021-12-08
 */
@Getter
@Setter
@ApiModel(value = "食材分类详情", description = "食材分类")
public class FoodCategoryDetail {

    private Integer dataId;


    @ApiModelProperty("分类名称")
    private String categoryName;

    @ApiModelProperty("分类描述")
    private String categoryDesc;

    @ApiModelProperty("创建时间")
    private Date categoryCreateTime;

    private String categoryCache;

    private String heatTemp;

    private String categoryThumb;

    public FoodCategoryDetail parseFromPo(DtrdExtEmsYwFoodCategory po) {
        dataId = po.getDataId();
        categoryName = po.getCategoryName();
        categoryDesc = po.getCategoryDesc();
        categoryCreateTime = po.getCategoryCreateTime();
        categoryCache = po.getCategoryCache();
        heatTemp = po.getHeatTemp();
        categoryThumb = po.getCategoryThumb();
        return this;
    }
}
